import request from "@/utils/request";

// 查询题库列表
export function listJuanQuestionRepos(query) {
  return request({
    url: "/juan/juanQuestionRepos/list",
    method: "get",
    params: query,
  });
}

// 查询题库详细
export function getJuanQuestionRepos(reposId) {
  return request({
    url: "/juan/juanQuestionRepos/" + reposId,
    method: "get",
  });
}

// 新增题库
export function addJuanQuestionRepos(data) {
  return request({
    url: "/juan/juanQuestionRepos",
    method: "post",
    data: data,
  });
}

// 新增题库
export function mergeRepos(data) {
  return request({
    url: "/juan/juanQuestionRepos/mergeRepos",
    method: "post",
    data: data,
  });
}

// 修改题库
export function updateJuanQuestionRepos(data) {
  return request({
    url: "/juan/juanQuestionRepos",
    method: "put",
    data: data,
  });
}

// 删除题库
export function delJuanQuestionRepos(reposId) {
  return request({
    url: "/juan/juanQuestionRepos/" + reposId,
    method: "delete",
  });
}

// 题库统计
export function getReposChart() {
  return request({
    url: "/juan/juanQuestionRepos/getReposChart",
    method: "get",
  });
}

// 按相关性统计
export function getStatisticsByRelevance(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByRelevance",
    method: "get",
    params: query,
  });
}

// 按题型统计
export function getStatisticsByType(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByType",
    method: "get",
    params: query,
  });
}

// 按能力层次统计
export function getStatisticsByLevel(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByLevel",
    method: "get",
    params: query,
  });
}

// 按难易度统计
export function getStatisticsByEasy(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByEasy",
    method: "get",
    params: query,
  });
}

// 按难易度统计
export function getStatisticsByImportance(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByImportance",
    method: "get",
    params: query,
  });
}

// 按章节统计
export function getStatisticsByKnowledge(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByKnowledge",
    method: "get",
    params: query,
  });
}

// 按章节统计
export function getStatisticsByPoint(query) {
  return request({
    url: "/juan/juanQuestion/getStatisticsByPoint",
    method: "get",
    params: query,
  });
}

// 题库汇总统计
export function juanCourseTotal(query) {
  return request({
    url: "/system/juanCourse/total",
    method: "get",
    params: query,
  });
}

// 题库汇总统计查询
export function getStatisticsByTotal(query) {
  return request({
    url: "/system/juanCourse/getStatisticsByTotal",
    method: "get",
    params: query,
  });
}
